package pl.lodz.p.pai.invoice.db;

import java.util.List;
import java.util.Map;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import javax.xml.datatype.XMLGregorianCalendar;

import pl.lodz.p.pai.common.IbatisDaoBase;
import pl.lodz.p.pai.invoice.bean.AddInvoiceStatusBean;
import pl.lodz.p.pai.invoice.types.Invoice;

public class IbatisInvoiceDao extends IbatisDaoBase implements InvoiceDao{

	protected DataSource locateDataSource() {
		try {
			Context ctx = new InitialContext();
			DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/invoiceDS");
			return ds;
		} catch (NamingException e) {			
			return null;
		}

	}	
	
	public AddInvoiceStatusBean addInvoice(Invoice invoice) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public Invoice getInvoice(String id) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public List<Invoice> getInvoiceByCustomer(String customerId)
			throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public List<Invoice> getInvoiceByDate(XMLGregorianCalendar startDate, XMLGregorianCalendar endDate) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

}
